Example 3 - Create and save a schedule

 

This example starts Milestones Professional, creates a new file, adds a symbol on task row 1, and then saves the file under file name: "Test File From VBA.MLP"

 

Public Sub Example3()

Set objMilestones = CreateObject ("Milestones")

With objMilestones

    .Activate

    .AddSymbol 1, "11/12/2023", 2

    nFileHandleVariant = 0

    nFileHandleVariant = .Save("c:\myfiles\"+ "Test File From VBG.MLP")

    nFileHandleInt = nFileHandleVariant

    If (nFileHandleInt = 0) Then

        MsgBox "File Save Failed"

    End If

    .Refresh

    .Close

End With

Exit sub

end sub

 

 

 

  Notes:

 

visit our programmer's page for more examples

 

 

Related Topics

  1. Example 1 - Create, print, and save a file
  2. Example 2 - Open and print an existing schedule
  3. Save

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

To effectively program with this interface, it's important to learn all about Milestones Professional.  Learn about Milestones.

Milestones Professional 2025 Automation Methods and Properties.  © Copyright 2000-2025, KIDASA Software, Inc. All rights reserved.